package cn.com.jonpad.service;

import cn.com.jonpad.dao.DeptDao;
import cn.com.jonpad.entities.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptService{
	@Autowired
	private DeptDao dao ;

	public boolean add(Dept dept)
	{
		return dao.addDept(dept);
	}

	public Dept get(Long id)
	{
		return dao.findById(id);
	}

	public List<Dept> list()
	{
		return dao.findAll();
	}

}
